#ifndef MESSAGEPICKERSTANDARDITEMMODEL_H
#define MESSAGEPICKERSTANDARDITEMMODEL_H

#include <QStandardItemModel>
#include "message.h"

class MessagePickerStandardItemModel : public QStandardItemModel
{
    Q_OBJECT
public:
    enum WidgetType{
        TicketAdjust=9, //票款调整
        TicketIn=5,     //收票
        MoneyIn=8,      //收款
    };

    Q_ENUM(WidgetType)

    explicit MessagePickerStandardItemModel(QObject *parent = nullptr);

    QStringList header;

    void reset();

    void insertMessage(Message *message);

    void insertMessage(QList<Message*> messages);

    void setWidgetType(WidgetType widgetType);

    Message* getMessage(int index);
signals:

public slots:

private:
    QList<Message*> messages;

    WidgetType widgetType;
};

#endif // MESSAGEPICKERSTANDARDITEMMODEL_H
